package com.atstudy.headline.web.admin.mapper;

import com.atstudy.headline.entity.AdCampaigns;
import com.atstudy.headline.web.admin.vo.ad.AdCampaignsVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
* @author A
* @description 针对表【ad_campaigns(广告计划表)】的数据库操作Mapper
* @createDate 2025-06-12 13:55:56
* @Entity com.atstudy.headline.entity.AdCampaigns
*/
public interface AdCampaignsMapper extends BaseMapper<AdCampaigns> {

    /**
     * 分页查询
     * @param page
     * @param queryVo
     * @return
     */
    IPage<AdCampaigns> pageInfoByAdCampaigns(IPage<AdCampaigns> page, AdCampaignsVo queryVo);

    @Select("SELECT campaign_id, campaign_name FROM ad_campaigns WHERE status IN (1,2,3)") // 只查询有效状态
    List<Map<Integer, Object>> selectCampaigns();

}




